-
Couldn't load subscription status.
- Fork 55
Reversi Example #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Reversi Example #39
Conversation
1a70c74 to
07b5060
Compare
17b4572 to
2b76fff
Compare
fc3d721 to
f96b9e6
Compare
6011b70 to
7730d16
Compare
Codecov Report
@@ Coverage Diff @@
## master #39 +/- ##
=======================================
Coverage 61.32% 61.32%
=======================================
Files 40 40
Lines 2697 2697
=======================================
Hits 1654 1654
Misses 1043 1043 Continue to review full report at Codecov.
|
Motivation & Vision
One thing I'd like people to see about turtle is that, in a way, it is actually just a graphics engine with a very specific (additive) rendering model. That means that you can write quite a few kinds of applications and games using turtle. With its events model, you can even write interactive applications.
Right now, you can use turtle to create any application that can be modelled so that new pieces of interface are drawn on top of previous ones. Sometimes this takes a bit of creativity, like it did in this example, but you can definitely create a lot using the simple primitives provided by this library. In the future, even that limitation will be lifted and you will be able to create even more using turtle.
The reason that this is important is because it allows turtle to be a legitimate learning tool for applications that go beyond simple toy examples. If we can accomplish this goal, we can take people writing programs that draw simple circles and teach them to write actually useful and productive applications. The smaller we make the gap between crates like turtle and creating applications with more traditional and advanced frameworks, the easier it will be for people to make that transition.
Note: the point is not for people to actually use turtle instead of an actual GUI library. The point is to close most of the gap so that switching to something beyond turtle isn't impossible. It's important to think about where people will go after learning about the library.
Reversi
This example is in progress. By the time it is finished, the game Reversi will be fully implemented. This game is perfectly suited to turtle because it doesn't require completely re-rendering the scene every frame. We can just keep adding things on top of the existing drawings.
As turtle matures and gains more features, this example can improve and gain more advanced features. For example, when undo gets added, there's a possibility of drawing indicators on the valid moves and then undoing them away when the user clicks. With text support (#22), we could render the score on the screen.
Progress So Far
The turtle responds to mouse clicks and draws new pieces on the board. No rules are enforced yet and you cannot win/lose.